package class517
public class Demo {
    public static void main(String[] args) {
        public static void main(String[] args) {
            Asd asd1 = new Asd("111","lirongheng",250,"000");
            Asd asd2 = new Asd("222","sucanxing",150,"789");
            Asd asd3 = new Asd("333","jiangyuwen",250,"456");
            Asd asd4 = new Asd("444","yaoyudi",250,"123");
            List<Asd> list = new ArrayList();
            list.add(asd1);
            list.add(asd2);
            list.add(asd3);
            list.add(asd4);
            System.out.println("欢迎来到员工信息管理系统");
            System.out.println("1.添加员工信息");
            System.out.println("2.查询员工信息");
            System.out.println("3.删除员工信息");
            System.out.println("4.修改员工信息");
            System.out.println("请输入你需要进行的操作");
            Testlist testlist = new Testlist();
            Scanner scanner = new Scanner(System.in);
            int n =scanner.nextInt();
            switch (n) {
                case 1:
                    break;
                case 2:
                    for(int i = 0;i<list.size();i++){
                        System.out.println(list.get(i));
                    }
                    break;
                case 3:
                    System.out.println("请输入你需要删除那个员工的编号");
                    String num = scanner.next();
                    testlist.deleteAsdNumber(list,num);
                    break;
                case 4:
                    System.out.println("请输入你需要修改的员工编号");
                    String updateNumber = scanner.next();
                    Asd updateAsd = testlist.findAsdNumber(list,updateNumber);
                    System.out.println("请输入你需要修改的员工的年龄");
                    int updateAge = scanner.nextInt();
                    updateAsd.setAge(updateAge);
                    testlist.updateAsdAge(list,updateAsd);
                    break;
            }
        }
    }